package ru.jexp.rcp.supply.beans.correlate;

import ru.jexp.rcp.supply.wizard.JExpWizardListener;
import ru.jexp.ucet.nakladnaa.Nakladnaa;

public class WizardCorrelatePrezentor implements JExpWizardListener {

	private IWizardCorrelate view;
	private CorrelateModel model;

	public WizardCorrelatePrezentor(IWizardCorrelate view) {
		this.view = view;
		this.view.addWizardListener(this);

	}

	@Override
	public void event(int type) {
		switch (IWizardCorrelate.WIZARD_PAGE_NAKL_CHANGENAKL) {
		case 0:
			OnNaklChanged();
			break;
		}
	}

	private void OnNaklChanged() {
		model.setNakl((Nakladnaa) view.getNaklLookupData());
		view.setInputNaklStrViewer(model.getStrNakl());
	}

}
